package qianmo.system.domain.vo;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import qianmo.common.core.annotation.Excel;
import qianmo.common.core.web.domain.BaseEntity;

import java.util.List;

/**
 * 评论对象 comments
 *
 * @author qianmo
 * @date 2025-03-26
 */
public class CommentWhitChild extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    @Excel(name = "主键ID")
    private Long id;

    /** 所属题目ID */
    @Excel(name = "所属题目ID")
    private Long questionId;

    /** 父评论ID，用于多级评论 */
    @Excel(name = "父评论ID，用于多级评论")
    private Long parentId;

    /** 评论人姓名 */
    @Excel(name = "评论人姓名")
    private String author;

    /** 评论文本 */
    @Excel(name = "评论文本")
    private String content;

    /**
     * 孩子节点
     * @param id
     */
    List<CommentWhitChild> childList;

    public List<CommentWhitChild> getChildList() {
        return childList;
    }

    public void setChildList(List<CommentWhitChild> childList) {
        this.childList = childList;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setQuestionId(Long questionId)
    {
        this.questionId = questionId;
    }

    public Long getQuestionId()
    {
        return questionId;
    }

    public void setParentId(Long parentId)
    {
        this.parentId = parentId;
    }

    public Long getParentId()
    {
        return parentId;
    }

    public void setAuthor(String author)
    {
        this.author = author;
    }

    public String getAuthor()
    {
        return author;
    }

    public void setContent(String content)
    {
        this.content = content;
    }

    public String getContent()
    {
        return content;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("questionId", getQuestionId())
                .append("parentId", getParentId())
                .append("author", getAuthor())
                .append("content", getContent())
                .append("createTime", getCreateTime())
                .toString();
    }
}
